using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UIBase : UIObject
{
    protected string GetUIName()
    {
        return this.gameObject.name.Replace("(Clone)", "");
    }

    public virtual void OnButtonCloseClick()
    {
        this.CloseUI();
    }

    public void CloseUI()
    {
        UIManager.Instance.CloseUI(this.GetUIName());
    }

    public void OnHandleClose()
    {
        this.OnClose();
    }

    protected virtual void OnClose()
    {

    }
}
